import http from './http.js'

let baseUrl = '/apis'
// let baseUrl = ''

export const area = (areaId) => {
    return http.get(baseUrl + '/api/area/' + areaId)
}

export const LevelGroup = (areaId) => {
    return http.get(baseUrl + '/papi/visual/getLevelGroup?areaId=' + areaId)
}

export const PatrolView = (areaId, startTimeStr) => {
    return http.get(baseUrl + '/papi/visual/getPatrolView.do?area=' + areaId + '&startTimeStr=' + startTimeStr)
}

export const Plant = (areaId, startTimeStr) => {
    return http.get(baseUrl + '/papi/visual/getPlant.do?area=' + areaId + '&startTimeStr=' + startTimeStr)
}

export const Animal = (areaId, startTimeStr) => {
    return http.get(baseUrl + '/papi/visual/getAnimal.do?area=' + areaId + '&startTimeStr=' + startTimeStr)
}

export const patrolSpecies = (areaId, startTimeStr) => {
    return http.get(baseUrl + '/papi/visual/patrolSpecies.do?areaId=' + areaId + '&startTimeStr=' + startTimeStr)
}

export const layerList = (areaId) => {
    return http.get(baseUrl + '/api/hanshiqiaoLayer/layerList?areaId=' + areaId)
}

export const Fenbu = (areaId, startTimeStr) => {
    return http.get(baseUrl + '/papi/visual/getFenbu.do?area=' + areaId + '&startTimeStr=' + startTimeStr)
}

export const baseInfo = (areaId) => {
    return http.get(baseUrl + '/papi/shimentaiDataVisual/baseInfo?areaId=' + areaId)
}

export const animalCount = (areaId) => {
    return http.get(baseUrl + '/papi/shimentaiDataVisual/animalCount?areaId=' + areaId)
}

export const topTen = (areaId) => {
    return http.get(baseUrl + '/papi/shimentaiDataVisual/topTen?areaId=' + areaId)
}

export const plantCount = (areaId) => {
    return http.get(baseUrl + '/papi/shimentaiDataVisual/plantCount?areaId=' + areaId)
}

export const layers = (areaId) => {
    return http.get(baseUrl + '/api/layer/layerList?areaId=' + areaId)
}

export const specieNameList = (areaId, type, keywords) => {
    return http.get(baseUrl + '/papi/mapData/specieNameList?areaId=' + areaId + '&type=' + type + '&keywords=' + keywords)
}

export const speciesDistribute = (areaId, type, keywords) => {
    return http.get(baseUrl + '/papi/mapData/speciesDistribute?areaId=' + areaId + '&type=' + type + '&speciesName=' + keywords)
}